<?php
// 
//  common.php
//  www.6block.com
//  
//  Created by Will_Lee on 2011-06-08.
//  Copyright 2011 lishuzu. All rights reserved.
// 
/**
* 通用类
*/
class Common
{
	
	function __construct()
	{
		$this->CI = &get_instance();
	}
	//检查站点是否关闭
	function checkclose() {
		$site_config = $this->CI->config->item('site_config');
		//站点关闭
		if($site_config['close'] && $this->CI->uri->segment(1) != 'admin') {
			if(empty($site_config['closereason'])) {
				showmessage('对不起本站暂时关闭');
			} else {
				showmessage($site_config['closereason']);
			}
		}
		return true;
	}
}
?>